<?php

namespace App\Enums;

use BenSampo\Enum\Enum;

/**
 * @method static static OptionOne()
 * @method static static OptionTwo()
 * @method static static OptionThree()
 */
final class SalePerformanceType extends Enum
{
    //类型:0=定金,1=尾款,2=全款
    const DEPOSIT = 0;
    const BALANCE = 1;
    const FULL = 2;


    public static function getDescription(mixed $value): string
    {
        return match ($value) {
            self::DEPOSIT => '定金',
            self::BALANCE => '尾款',
            self::FULL => '全款',
            default => self::getKey($value),
        };
    }
}
